<?php
defined('_JEXEC') or die('Restricted access');
JToolBarHelper::title(JText::_('COM_JHTRAQ_STATISTICS'), 'generic.png');
//JToolBarHelper::preferences('com_jhtraq');
?>
<table width="100%" cellspacing="0" class="adminlist">
<tr class="row0">
<td width="150"><?php echo JText::_('COM_JHTRAQ_PROJECTS');?></td>
<td><?php echo $this->projects?></td>
</tr>
<tr class="row1">
<td width="150"><?php echo JText::_('COM_JHTRAQ_TICKETS')?></td>
<td><?php echo $this->tickets?></td>
</tr>
<tr class="row0">
<td width="150"><?php echo JText::_('COM_JHTRAQ_USERS')?></td>
<td><?php echo $this->users?></td>
</tr>
<tr class="row1">
<td width="150"><?php echo JText::_('COM_JHTRAQ_JH_TRAQ_VERSION')?></td>
<td><?php echo $this->version; ?> <?php if($this->version != $this->latest && $this->latest != '') {?><a href="http://jhshop.info/jh-shop/jhtraq/releases"> - Upgrade <?php echo $this->latest;?> Available</a><?php } ?></td>
</tr>
</table>

<fieldset class="adminform">
<legend><?php echo JText::_("COM_JHTRAQ_LATEST_NEWS");?></legend>
<?php

$info = $this->latestNews();

foreach($info->channel->item as $item)
{
?>
<div class="subborder">
	<fieldset class="adminform">
<legend><?php echo $item->title;?></legend>
   	  <table width="100%" border="0" cellspacing="2" cellpadding="0" class="adminlist">
	  <thead>
    	  <tr>
    	    <td width="90%"><?php echo $item->pubDate?></td>
    	    <td><a href="<?php echo $item->link?>" target="_blank" class="tooltip" title="Read more about the topic at JHShop!"><?php echo JText::_("COM_JHTRAQ_READ_MORE");?></a></td>
        </tr>
	</thead>
	<tbody>
    	  <tr>
    	    <td colspan="2"><?php echo $item->description?></td>
  	    </tr>
	  </tbody>
  	  </table>
	</fieldset>
</div>
<?php
}
?>
</fieldset>
